package com.zs.admin.vo.wisdbook;

import com.alibaba.fastjson2.JSONObject;
import com.zs.common.util.StringUtils;
import com.zs.common.util.YmlUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel("智书标记块数据详情Vo")
public class WisdbookPageMarkDetailVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "标注块id")
    private String id;

    @ApiModelProperty(value = "页id")
    private Integer pageId;

    @ApiModelProperty(value = "父id")
    private String pid;

    @ApiModelProperty(value = "父页id")
    private Integer ppageId;

    @ApiModelProperty(value = "块图地址")
    private String imgUrl;

    @ApiModelProperty(value = "位置信息json")
    private JSONObject shape;

    @ApiModelProperty(value = "矩形框")
    private String featureType;

    @ApiModelProperty(value = "标注类型")
    private String markType;

    public String getImgUrl() {
        String https = YmlUtils.get("ossResource.https");
        if(StringUtils.isNotEmpty(imgUrl)){
            return https+imgUrl;
        }
        return imgUrl;
    }
}
